package com.accp.demo.mapper.pruchase;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.accp.demo.pojo.purchase.PurchaseInquiry;
import com.accp.demo.pojo.purchase.PurchaseInquiryDetail;



/**
 * 采购询价
 * @author Administrator
 *
 */

public interface IPurchaseInquiryMapper {
	/**
	 * 主从新增采购询价
	 * @param inquiry
	 * @return
	 */
	public void savePurchaseInquiry(@Param("map") Map<String, Object> map);
	public Integer savePurchaseInquiryDateil(@Param("map") Map<String, Object> map);
	/**
	 * 根据询价主表的编号查询count
	 * @param id
	 * @return
	 */
	public Integer queryInquiryCount(@Param("billNo") String id);
	public Integer queryInquiryAllCount();
	public String queryMaxId(@Param("map") Map<String, Object> map);
	/**
	 * 修改主从表信息
	 * @param inquiry
	 * @return
	 */
	public Integer updateInquiry(@Param("map") Map<String, Object> map);
	/**
	 * 根据编号查询询价主表
	 * @param id
	 * @return
	 */
	public PurchaseInquiry queryInquiryInfo(String id);
	
	/**
	 * 根据编号查询询价从表
	 * @param id
	 * @return
	 */
	public Set<PurchaseInquiryDetail> queryInquiryDetailInfo(String id);
	/**
	 * 分页查询
	 * @param pagenum
	 * @param pagesize
	 * @return
	 */
	public List<PurchaseInquiry> queryInquiryPage(@Param("num")Integer pagenum,@Param("size")Integer pagesize); 
	/**
	 * 删除从表
	 * @param id
	 * @return
	 */
	public Integer deleteDateil(@Param("map") Map<String, Object> map);
	/**
	 * 逻辑删除 主表
	 * @param id
	 * @param state
	 * @return
	 */
	public Integer updateInquiryDel(@Param("map") Map<String, Object> map);
	/**
	 * 审核
	 * @param id
	 * @param state
	 * @return
	 */
	public Integer updateInquirySH(@Param("map") Map<String, Object> map);
}
